Polymorphism
C. Function overriding uses the same input parameters, whereas
overloading does not
D. All of the above
Q85: What would be the issue with the following code?
// SPDX-License-Identifier: SOME IDENTIFIER
pragma solidity ^0.8.10;
contract Calculator {
function calculate(uint a, uint b) public pure returns(uint)
{
return a*b;
}
function calculate(uint a, uint b) public pure returns(uint,
uint) {
return (a*b, b);
}
}
A. No issues, the code would compile, get deployed, and run
B. The code would throw a compilation error as both functions
have the same name and same input parameters
C. The code would throw a runtime error as both functions have
the same name and same input parameters
D. None of these
Q86: What would be the issue with the following code?
// SPDX-License-Identifier: SOME IDENTIFIER
pragma solidity ^0.8.10;
contract Mammal {
function mammalFunction() public pure returns(string memory)
{